

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>采购订单</title>
    <link rel="stylesheet" type="text/css" href="/static/plugins/easyui/themes/material/easyui.css">
    <link rel="stylesheet" type="text/css" href="/static/plugins/easyui/themes/icon.css">
    <script type="text/javascript" src="/static/plugins/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="/static/plugins/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/static/plugins/easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="/static/js/orderBill.js"></script>
</head>

<body>
<table id="orderBill_datagrid"></table>
<div id="orderBill_toolbar">
    <a class="easyui-linkbutton" href="#" iconCls="icon-add" plain="true" data-cmd="add">新增</a>
    <a class="easyui-linkbutton" href="#" iconCls="icon-edit" plain="true" data-cmd="edit" id="edit_btn">编辑</a>
    <a class="easyui-linkbutton" href="#" iconCls="icon-remove" plain="true" data-cmd="changeAudit" id="changeAudit_btn">审核订单</a>
    <a class="easyui-linkbutton" href="#" iconCls="icon-reload" plain="true" data-cmd="reload">刷新</a>
</div>
<div id="orderBill_btns">
    <a class="easyui-linkbutton" href="#" iconCls="icon-save" plain="true" data-cmd="save">保存</a>
    <a class="easyui-linkbutton" href="#" iconCls="icon-cancel" plain="true" data-cmd="cancel">取消</a>
</div>
<table id="itemTr">
    <tr>
        <td></td>
        <td>
            <span tag="sn" name="product.ProductSn"></span>
            <input type="hidden" name="product.id" tag="pid"/>
        </td>
        <td><span tag="name" name="product.productName"></span></td>
        <td><input tag="number" name="number" type="number" /></td>
        <td><input tag="costPrice" name="costPrice" type="number" readonly/></td>
        <td><span tag="amount"></span></td>
        <td><input tag="remark" name="remark"/></td>
        <td>
            <a class="easyui-linkbutton deleteItem" href="#" iconCls="icon-remove" plain="true"></a>
        </td>
    </tr>
</table>

<div id="orderBill_dialog">
    <form id="orderBill_form" method="post">
        <input type="hidden" name="id">
        <table align="center"style="margin :15px; border-spacing:10px;">
            <tr>
                <td>订单编号:<input disabled="disabled" id="mySn" name="sn" style="width:170px;" class="easyui-textbox" prompt="系统自动生成"></td>
            </tr>
            <tr>
                <td>业务时间:<input name="vdate" style="width:170px;" class="easyui-datetimebox"></td>
            </tr>
            <tr>
                <td>供应商:<input type="text" name="supplier.id" class="easyui-combobox"
                              data-options="url:'/supplier/selectAll.do',textField:'name',valueField:'id',panelHeight:'auto'"></td>
            </tr>
            <tr>
                <td>仓库:<input type="text" name="depot.id" class="easyui-combobox"
                            data-options="url:'/depot/selectAll.do',textField:'name',valueField:'id',panelHeight:'auto'"></td>
            </tr>
        </table>
        <table align="center" style="margin-top: 20px">
            <thead>
            <tr>
                <td width="50"><a class="easyui-linkbutton" href="#" iconCls="icon-add" plain="true" data-cmd="addProduct"></a></td>
                <td width="120">商品编码</td>
                <td width="120">商品名称</td>
                <td width="120">商品数量</td>
                <td width="120">商品单价</td>
                <td width="120">商品总计</td>
                <td width="120">备注</td>
            </tr>
            </thead>
            <tbody id="edit_tbody">
            </tbody>
        </table>
    </form>
</div>
<div id="product_view"><table id="pro_datagrid"></table></div>
</body>

</html>


